31. Notebook + 练习:案例研究 I

Workspace

This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity , so you may be able to download them there.

Workspace Information:

  • Default file path:
  • Workspace type: jupyter
  • Opened files (when workspace is loaded): n/a

QUIZ QUESTION: :

根据描述选出相应的值。

ANSWER CHOICES:



描述

数值

77.95

0

7%

0%

69.03

0

SOLUTION:

描述

数值

77.95

0

0

7%

0

0

QUIZ QUESTION: :

观察每对观测数据的相关性,根据描述选出相应的值。

ANSWER CHOICES:



描述

变量

No

LSTAT

DIS

Yes

INDUS

Maybe

RM

RAD

SOLUTION:

描述

变量

LSTAT

DIS

Yes

RAD

QUIZ QUESTION: :

观察由线性模型得出的 p 值,标注下列变量为具统计 显著性 无显著性

ANSWER CHOICES:



变量

统计显著性

显著性

无显著性

显著性

无显著性

SOLUTION:

变量

统计显著性

显著性

显著性

无显著性

无显著性

显著性

显著性

无显著性

无显著性

假设你真的很在乎 RAD INDUS 变量,而且你认为最好把模型的所有 VIF 值都限制在 4 以内,那么你会删除哪些变量呢?

SOLUTION: 你需要删除 `TAX` 和 `NOX`,删掉后另外两个 VIF 就会变小。

把第二个模型的结果同第一个模型的进行比较,选出下列所有正确的说法。

SOLUTION:
  • 根据 p 值,我们应该删除 `RAD`,但保留其它变量。

这三个模型中,哪个对测试数据的预测效果更好?

SOLUTION: 使用所有变量的全模型。